package com.vmladenov.cook.core.db;

import java.util.ArrayList;

import com.vmladenov.cook.core.html.SmallPreview;
import com.vmladenov.cook.core.objects.UsefulView;

public class SpicesRepository extends WebServiceRepository  implements ISmallPreviewListRepository
{
	private final String servicePath = "UsefullService/";
	
	@Override
	protected String getServicePath()
	{
		return servicePath;
	}
	
	@Override
	public long getRowCount()
	{
		return getRowCount("GetSpicesCount");
	}

	@Override
	public ArrayList<SmallPreview> getPreviews(long start, int sorting)
	{
		return getPreviews("GetSpices", start, sorting);
	}

	public UsefulView getSpiceView(long id)
	{
		return getBigUseful("GetSpice", id);
	}

	public ArrayList<SmallPreview> searchSpices(String query)
	{
		return searchPreviews("SearchSpices", query);
	}
}
